import os
import time

g_num = 100
ret = os.fork()
# 进程无法修改全局变量
if ret == 0:
    print("===1===")
    g_num = 101
    print(g_num)
else:
    time.sleep(2)
    print("===2===")
    print(g_num)
